import { lable_item } from "@/common/lable-data"
import {Module,VuexModule,Mutation,Action,getModule,} from 'vuex-module-decorators';

/**
 * 公共的状态记录
 */
export default {
    namespaced: true,
    state: {
        menu_width: "MAX",//菜单栏尺寸  值：   MAX   MIN
        lable_list:new Array()
    },
    mutations: {
        setMenu_width(state: any, data: string) {
            state.menu_width = data
        }, 
        addLable_list(state: any, data: Array<lable_item> ) {
            console.log(data)
            state.lable_list =[ ...state.lable_list,...data]
        },
        removeLable_list(state: any, data: number) {
            state.lable_list = state.lable_list.splice(data,1)
        },
    },
}